{extend name="layouts/main" /}
{block name="content"}
<div class="layui-tab layui-tab-brief" lay-filter="demoTitle">
	<div class="layui-body layui-tab-content site-demo site-demo-body" style="top: 0px;left: 0px;">
		<div class="layui-tab-item layui-show">
			<div class="layui-main">
				<div id="LAY_preview">
					<form class="layui-form layui-form-pane form-horizontal" action="{:url('')}" method="post">
						<div class="layui-form-item">
							<label class="layui-form-label">标签名称</label>
							<div class="layui-input-block">
								<input type="text" name="name" disabled value="{$info.name|default=''}"  placeholder="标签名称" autocomplete="off" class="layui-input">
								<span class="layui-form-mid layui-word-aux">
									[ 标签名称 ]
								</span>
								<span class="sysval"><em class="zerocopy">name</em></span>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">标签颜色</label>
							<div class="layui-input-inline">
								<input type="text" id="color-color" name="color" value="{$info.color|default=''}"  placeholder="标签颜色" autocomplete="off" class="layui-input">
								<span class="layui-form-mid layui-word-aux">
									[ 标签颜色 ]
								</span>
								<span class="sysval"><em class="zerocopy">color</em></span>
							</div>
							<div class="layui-inline" style="left: -11px;">
								<div id="test-form-color"></div>
							</div>
							<script type="text/javascript">
								layui.use('colorpicker', function(){
									var colorpicker = layui.colorpicker;
									colorpicker.render({
										elem: '#test-form-color'
										,color: '{$info.color}'
										,done: function(color){
											$('#color-color').val(color);
										}
									});
								});
							</script>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">seo标题</label>
							<div class="layui-input-block">
								<input type="text" name="seotitle" value="{$info.seotitle|default=''}"  placeholder="" autocomplete="off" class="layui-input">
								<span class="layui-form-mid layui-word-aux">
									[ seo标题 ]
								</span>
								<span class="sysval"><em class="zerocopy">seotitle</em></span>
							</div>
						</div>
						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">关键字<span class="sysval"><em class="zerocopy">keywords</em></span></label>
							<div class="layui-input-block">
								<textarea name="keywords" placeholder="请输入内容" class="layui-textarea">{$info.keywords|default=''}</textarea>
								<span class="layui-form-mid layui-word-aux">
									[ 关键字 ]
								</span>
							</div>
						</div>
						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">描述<span class="sysval"><em class="zerocopy">description</em></span></label>
							<div class="layui-input-block">
								<textarea name="description" placeholder="请输入内容" class="layui-textarea">{$info.description|default=''}</textarea>
								<span class="layui-form-mid layui-word-aux">
									[ 描述 ]
								</span>
							</div>
						</div>
						<div class="layui-form-item" pane="">
							<label class="layui-form-label">状态</label>
							<div class="layui-input-block">
								<input type="radio" name="status" value="1" title="显示" checked="">
								<input type="radio" name="status" value="0" title="隐藏">
								<span class="sysval"><em class="zerocopy">status</em></span>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">浏览数</label>
							<div class="layui-input-block">
								<input type="text" name="view" value="{$info.view|default='0'}" required="" lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
								<span class="layui-form-mid layui-word-aux">
									[ 点击数 ]
								</span>
								<span class="sysval"><em class="zerocopy">view</em></span>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">窗口类型</label>
							<div class="layui-input-block">
								<select name="target" lay-verify="required" class="upload-select">
									<option value="_blank">_blank在新窗口中打开被链接文档</option>
									<option value="_self">_self默认。在相同的框架中打开被链接文档</option>
									<option value="_parent">_parent在父框架集中打开被链接文档</option>
									<option value="_top">_top在整个窗口中打开被链接文档</option>
									<option value="framename">framename在指定的框架中打开被链接文档</option>
								</select>
								<span class="layui-form-mid layui-word-aux">
									[ HTML a 标签的 target 属性 ]
								</span>
								<span class="sysval"><em class="zerocopy">target</em></span>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">rel 属性</label>
							<div class="layui-input-block">
								<select name="rel" lay-verify="required" class="upload-select">
									<option value="nofllow">nofllow：Google使用"nofollow"，用于指定Google搜索引擎不要跟踪链接</option>
									<option value="external">external：此属性的意思是告诉搜索引擎，这个链接不是本站链接</option>
									<option value="noopener noreferrer">noopener noreferrer：在新打开的页面（baidu）中可以通过 window.opener获取到源页面的部分控制权， 即使新打开的页面是跨域的也照样可以（例如 location 就不存在跨域问题）</option>
								</select>
								<span class="layui-form-mid layui-word-aux">
									[ HTML a 标签的 rel 属性 ]
								</span>
								<span class="sysval"><em class="zerocopy">rel</em></span>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">排序</label>
							<div class="layui-input-block">
								<input type="text" name="sort" value="{$info.sort|default='0'}" required="" lay-verify="required" placeholder="排序" autocomplete="off" class="layui-input">
								<span class="layui-form-mid layui-word-aux">
									[ 排序 ]
								</span>
								<span class="sysval"><em class="zerocopy">sort</em></span>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block" style="border: 0px;">
								<input type="hidden" name="id" value="{$info.id|default=''}">
								<button class="layui-btn x_admin_close ajax-post" type="submit" target-form="form-horizontal" lay-submit="" lay-filter="formDemo">提交保存</button>
								<!-- <button type="reset" class="layui-btn layui-btn-danger">重置</button>
								<a class="layui-btn layui-btn-primary" href="javascript:;" onclick="history.go(-1);">返回</a> -->
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="footer"}
{/block}
{block name="js"}
<script type="text/javascript">
	$("select[name='target']").val("{$info.target|default='_self'}");
	$("select[name='rel']").val("{$info.rel|default=''}");
    $("input[name=status][value={$info.status|default = 1}]").attr("checked","checked");
</script>
{/block}